#ifndef RENDER_TEXTURE2D_H
#define RENDER_TEXTURE2D_H

#include <render/texture.h>
#include <graphics/material.h>

namespace yam3d
{
namespace graphics
{
    class Image2D;
}


namespace render
{

    class Texture2D : public Texture
    {
    public:
        Texture2D(graphics::Image2D* img, bool genMipMaps=true);
        virtual ~Texture2D();

        void bind(const graphics::SamplerState* samplerState, int samplerUnit) const;

        const graphics::Image2D* const getImage() const;

    private:
        bool m_hasMipMaps;
        core::Ref<graphics::Image2D> m_image;

        Texture2D();
        Texture2D(const Texture2D&);
        Texture2D& operator=(const Texture2D&);
    };


}
}
#endif // RENDER_TEXTURE2D_H
